package com.example.starseas_phone;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;

import com.example.starseas_phone.Entity.Students;
import com.example.starseas_phone.Entity.Workers;

public class Worker_detailsActivity extends AppCompatActivity {

    private TextView Worker_details_WorkerName;
    private TextView Worker_details_WorkerSex;
    private TextView Worker_details_WorkerAge;
    private TextView Worker_details_Workercarid;
    private TextView Worker_details_WorkerPhone;
    private TextView Worker_details_WorkerEmail;
    private TextView Worker_details_WorkerbackTime;
    private TextView Worker_details_WorkerLocal;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_worker_details);
        initid();
        Intent intent = getIntent();
        Workers workers = (Workers) intent.getSerializableExtra("workers");
        initview(workers);
    }

    private void initid(){
        Worker_details_WorkerName = (TextView) findViewById(R.id.Worker_details_WorkerName);
        Worker_details_WorkerSex = (TextView) findViewById(R.id.Worker_details_WorkerSex);
        Worker_details_WorkerAge = (TextView) findViewById(R.id.Worker_details_WorkerAge);
        Worker_details_Workercarid = (TextView) findViewById(R.id.Worker_details_Workercarid);
        Worker_details_WorkerPhone = (TextView) findViewById(R.id.Worker_details_WorkerPhone);
        Worker_details_WorkerEmail = (TextView) findViewById(R.id.Worker_details_WorkerEmail);
        Worker_details_WorkerLocal = (TextView) findViewById(R.id.Worker_details_WorkerLocal);
        Worker_details_WorkerbackTime = (TextView) findViewById(R.id.Worker_details_WorkerbackTime);

    }

    private void initview(Workers workers){
        Worker_details_WorkerName.setText(workers.getWorkerName());
        Worker_details_WorkerSex.setText(workers.getWorkerSex());
        Worker_details_WorkerAge.setText(workers.getWorkerAge()+"");
        Worker_details_Workercarid.setText(workers.getWorkerCarid());
        Worker_details_WorkerPhone.setText(workers.getWorkerPhone());
        Worker_details_WorkerEmail.setText(workers.getWorkerEmail());
        Worker_details_WorkerLocal.setText(workers.getWorkerLocal());
        Worker_details_WorkerbackTime.setText(workers.getWorkerbackTime());
    }

}